package com.ecr.hub.model.wagon;

import java.io.Serializable;

public class WagonPosition implements Cloneable, Serializable {

	private static final long serialVersionUID = 1L;
	private int posRailId;
	private int posNum;
	private boolean posReal;

	/**
	 * Constructeur
	 */
	WagonPosition() {
		setPosReal(false);
		setPosRailId(0);
		setPosNum(0);
	}

	// ****************************
	// Les getters et les setter.
	// ****************************

	public int getPosRailId() {
		return posRailId;
	}

	public int getPosNum() {
		return posNum;
	}

	public boolean isPosReal() {
		return posReal;
	}

	public void setPosRailId(int posRailId) {
		this.posRailId = posRailId;
	}

	public void setPosNum(int posNum) {
		this.posNum = posNum;
	}

	public void setPosReal(boolean posReal) {
		this.posReal = posReal;
	}

	// ************************
	// Le clone de la position.
	// ************************

	public Object clone() {

		WagonPosition p = null;
		try {
			p = (WagonPosition) super.clone();
		} catch (CloneNotSupportedException e) {
			// RAS.
		}
		return p;
	}
}
